IKSolver know works with chains of any length.

Also it saves the previous position to produce smooth transformations.