Initial work on networked game stuff. Little fixes throughout.