All kinds of todo items because otherwise I'd forget them.
Lots of code cleanup.