Refactoring implementation