reformatted some code, moved config into main.py & switched to using app.config for storing config