Rescued some changes that were somehow orphaned in recent merges.
Clean up according to code style guide