Fixed a whole bunch of stuff