Cleaned up the require clusterfuck
Added cache functions
Massive commit this time - removed a bunch of shitty formatting code, redid posting and file upload handling, added new functions for fetching user input which will eventually replace the boilerplate code in various places.