Clean up logging.

Signed-off-by: Tod Fitch <Tod@FitchDesign.com>
Clean up data structures on database query

Signed-off-by: Tod Fitch <Tod@FitchDesign.com>