More code factorization