Vector factorization code added.