TROIA-133 refactored generator code.