Updated the tests, all passed.
Clean up code