Refactor of the intermediate representation.