Fixed a bunch of broken stuff