Change to monadic syntax and fix parts of reg alloc
Add a coalescer for the second phase