Fix some issues with pep8 and typo for attribute required