Minor tweaks and convenience functions for API.