Cleaning up the JS