API: Minor refactoring.