Probably breaking everything...

Cleaned up a whole bunch of code, added a few new features, and likely
broke everything in the process. Also can't test locally anymore because
of a bug in bcrypt, so I'm mostly pushing all of this just so I can work
out the bugs.