Minified version and some fixes