Code with refactoring modifications