looks like some variables will always leak, but essentially this fixes #9. will leave scoping of functions for now.
updating CHANGELOG for scoping fixes