Small refactoring changes applied