Changed the way rendering is called in index.php