More cleaning-up. Almost ready for protocol hacking.