many other simplifications + pep8 on part of the code base