Cleaned up functions. Added doc strings
Pylint cleanup