code cleanup: use AbstractVecOrMat more consistently instead of Union(AbstractVector, AbstractMatrix)