Added setpoint_limit param, and removed debug statements