Fixed the majority of the tests