do not initialize an empty database with commands that do not add data or expect pre-existing content
minor fixes, mostly to silence compiler warnings; some inactive code disabled temporarily
fixed some potential errors found by the clang analyzer