Refactors mt_output
Much cleaner interface, no initializations in the runtime, just a single
call to the output.