Fixed pep8 errors and added some helpful comments