Added quaternion functions.