more cleanup
more work on the state-restore-mechanism. escape player name where necessary