WIP, $dbh selection is more correct now (hopefully?)