cleaned up code and added minify js