Refactor tests and test data.