Moved tests back onto index.html

And fixed a few things