Finished test refactoring