Pipeline cleanup

Responding to all the TODOs from #51.