Initial test refactoring