Update demo utils for 2.0.x API (and keep compatible with 1.x)
Merge branch 'master' into gh-pages