Cleaned up some javascript

Previously had a bunch of commented-out code