Code review (pep8 and some minor fixes)