Fixed up unit tests and cleaned up a few things