Refactoring part 1.