Fixed issue #7 with closure scope.

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