Note to self.

I'm working on using this in another project, and discovering some
shortcomings. Don't forget tests, future self!