Refactoring in the code