Minor refactoting