Continue refactoring IR gen. Still not much useful done.