refactoring comments and adding minified version