Fixed the tests and cleaned up the constructor