Adds an index file
Fixes some bugs discovered while testing, and adds a few more features