Housekeeping
Refactoring to remove duplication from compose and recompose generators.