added weighting to constraints, fixed bug in AvoidJointLimits constraint