A fair bit more refactoring of the plan on type stuff.