Refactored kernel API