Cleaned up code using pylint