Minor adjustments to the api implementations.

Mostly cleanups