Runs all tests, but needs a lot of refactoring