Added foldable instance for Vec instances.
Added quaternions.