Fixed a whole bunch of things. Some of them derpy.