Cleaned the code per pylint comments