Corrected allocated/deallocation methods, and some minor cleanup
Merge branch 'master' of github.com:mschenck/scratch