Added adaptive time stepping.