This has to be so fun to work on. It's rare to find a problem in need of this much clever abstraction.