Improved js file