Minified version + Major code cleanup

Code has been cleaned up to look nicer and be clearer

Furthermore, a minified version of the script is now provided.