Refactoring for tests
Documentation