Fixed a bunch of things, probably broke a lot