Refactoring due to remarks from pull-request