Complexity-reducing refactoring