Added comments
Merged changes from master
Pylint style corrections
Cleaned up main.py into discrete functions.