Began abstracting the dynamics

Began abstracting the dynamics with a long term goal of eliminating the
myriad ifdefs.
Continued abstracting the dynamics.
Completed abstraction of dynamics.

These changes are untested and highly likely to be unstable.