Bugfixes to Gamestate, mostly around indexing