added minified version of script.

general tidying up.