Completed all tests

All tests now pass, have been rewritten.