Debugged some errors invloving intialization of I and integral. Still
going out of control, however.