Refactor test structure.