ob_start is a work-around. I prefer fixing the actual problem. It's usually a white space issue.
Try adjusting the following...
<div class="container">
<?php require 'view/frontend/'.$tpl.'.php';?>
</div>
to
<div class="container">
<?php require 'view/frontend/'.$tpl.'.php';?>
</div>
See if that helps. Also make sure you don't have any extra white space going on in the included file.