Added support for detection of boundary crossing in the IDA integrator. Cleared up some code comments and formatting.