First primary refactoring