API refactoring, now following the API hierarchy