Minor refactoring after PR