Abstracted types.

Types were not sufficiently general - implemented another level of
abstraction to group type hierarchy.