Removed some database call from renderer.php