Move misc utils back here.

Separating them out while things are still changing so quickly is too
confusing. We can rip out code we want to share later.