Typo fixes.
More thinkos.
Sketch of main loop, and a tester for it.