Factor compiler pipeline into separate module.