Updated quaternion class