Reformat the db class