Added memory management functions to the version script. Added a script