Wip flush 5855 review

This branch consists of the last 8 commits against "next" the other are a result of the pull request being against master.   I modified Sam's original wip-flush slightly in 373b6ee.