Refactoring, testsuite passing