making some api fixes and additions.