New msgtx generation

Can't we combine these two for loops and get rid of the outputs slice?