Removed Legacy code and add minified version