Rename init() to initGame()
Move script switching blocks to own functions
Merge branch 'master' into gh-pages