Refactored API section