Removed unnecessary code from JS file