Some more touch-ups to api code