Modified example scripts to work on new api