Code refactoring done