Refactored to include Equations and transitions systems.