Cleaned up the JS and HTML