Refactored database routines.  Changed config.json to config.py and altered
all dict references to be config module variables