Improve module declaration style

* Wrap module in function wrapper to ensure proper global values.
* Fix file name in test.html.
* Add post prune command to npm package.