cleaned up code

* cleaned up the code according to suggestions from pylint and pep8
cleaned up code

* cleaned the code as per the suggestions from pylint and pep8