Code tidy up for pep8