Finish refactoring tests