Cleaned up some of the JS