Code factorizing