Addition of test suite and small changes to ensure all tests pass