Started writing DB.php - the database wrapper