Tests, internal refactoring.