Removed old code from JS file