Refactoring.
Refactoring plus template of tests.