Updated databasehandler