Added tests and improved minification.