Minor refactorting