Cleaned up the JS