Cleaned Up IK fn and moved variables into ConfigParams