Made non-static functions static and added <?php to db.php