Quaternion / bonerig refactoring