(re-written!) DBHandler class.