Fixed issue #7 with closure scope.

You might want to review the minified version, which I did with http://jscompress.com/.