Refactoring due to remarks from code review