Cleaned up regression and progression.

Introduced another typeclass, TransformableState, and moved common code
to the Base module.