Wrote a nice bit of code, turns out I didn't need it, so I'm stashing it.