Fixed fmin stuff. Added Joint Limits.