Cleaned up code, set up for PyLint