Cleanup.
Refactor type compiler code.