Minor refactoring