Minor refactoring done