Move api.php to index.php, update .htaccess, remove index.html
Add skeleton of api
Some more utility functions
Add .gitignore
Add some more code to api methods, clean up input handling