Cleaning up dead code from JS file