Fixed up a bunch of errors