Add level switch tests
Merge branch 'master' into gh-pages

* master:
  Add level switch tests