Refactoring to be in accordance with code review
Fixing test according to the code review