Completeely rewrote kinematic chaining

Actually works correctly now :D