General pep8 cleanup

Just to try to understand a little bit how the code is organized