Add serialization v3, which includes game mode.

fixes #42