Code refactoring changes