More cleanups for issue #207. Also ran over the code with the formatter again.