Merge pull request #42 from LinuxJedi/master

Alloc/free cleanups