Clean up some old JavaScript