Adapt some API to reflect logical changes
Adapt scripts to API change