Bunch of Bug Fixes

Here's a batch of bugfixes. I had to do all of this just to get it to work so I could demo Airbrake. I know now that Airbrake isn't what I'm looking for but here's my work anyways!