Clean up global variable leak.
Merge pull request #128 from kruppel/kurt/global-leak

Clean up global variable leak.