ensure we've properly scoped everything with 'var'
Merge branch 'master' into gh-pages