refactor for new api structure.
Merge remote-tracking branch 'origin/master'