updated LockConstraint constructor
rewrote DistanceConstraint on new Equation format