Intermediate code commit for the db work

Note: The file dimac_utils.py has some of the routines from image_browse.py. Once the latter is tested with the routines in the utils file, they will be removed from there.