Add minified version

Also updated example and use module pattern