Move the JS out of the index.html so we can get stuff a bit more organized