test refactoring, cleanup