api overhaul. DO NOT MERGE

Major restructuring of how the API works internally.

Do not merge yet. I've left a lot of the methods blank. For now, let me know what you think of the new way of specifying API endpoints.
I'm gonna add back the function thing that was here before. That was here because you need a global anonymous user variable, but you can't call put in the global frame when you're testing.