Minor refactoring done.