Fixed up a lot of stuff