OK, that's enough refactoring. It does seem a bit cleaner now, even if not quite as clear. Certainly more extensible.