Necessary refactoring