Mostly linted,querying to mongodb,1ce globals init

Added singleton-ish behavior for globals.py
Linted most of the python code so far