cleaning up .js file