Code Review/small refactoring