Working through some code cleanups suggested by flog