fix a couple errors in old code
create test DB managing commands