Moved DB functions to DBConnection.php