Code refactoring works