Output streaming fixes / further Tempcode optimisation