Types validation

Lots of goodies -- validations and remembering state as we change types.