This cleanup is important, but I'm punting on it for now in part because gwprice is working on a couple fixes/improvements to this in a separate pull request.