Added optimization pragmas to module Dynamics.
Added optimization pragmas to module Event.