Fix bogus db, add config reader base