Started to clean up a lot of the JS in the index.php file