Ok. I've stashed these off for a commit based on the new master head soon.

Things were getting pretty messy here. Thanks for cleaning it.