Refactoring and separation