Common refactoring