Refactored IK handling