Extend API functionality.

Comments welcome.