Adding back some supporting stuff that got lost in the shuffle to get this on github.