Refactoring triple production.