Stop using output buffer

Stop using outbuffer, use $html_output and $viewcontent, eventually
passed as reference, to generate output.