minor changes to portal and script API