reorg and fix json serialization <-> gamestate
Merge branch 'master' into gh-pages