fix leak, add test, for #33
rm comments
mv var to top of function to be consistent with style in rest of file
revise test to find all leaked globals
Merge pull request #34 from Trott/fix-leak

Fix leak, add test, for #33