Factorization of code