Changed to read config from settings.py and PEP8 formatting fixes