Minor refactoring changes