Fixed some db code, prepping unit tests.
Renamed db test case. Started fleshing out.
Continued test work - got a serious race condition somewhere in the opening code!