Updating index.py functions, adding in small javascript and a test page of the index