small tweaks to the api library.