Partial refactoring