#1858 rebased and a few extra things

extends / fixes #1858 

i don't know why i thought it would be fun to run the rebase, but at least it didn't turn out to be too painful.

I'd like to let these PRs simmer a few more days and then merge it when we have a few weeks to test it out.