Fixed a bunch of small errors