[WIP] Revise API implementation