Fixed the param issue. No longer needs to be declared in manCont. Moved the definition of base outside to avoid conflicts between PID and manCont. Moved begin_time outside to the main code so that you dont have to change it at multiple places each time. It is in the BeginManContThread now.