added minified version, added comment to top of file with licence and general tidying