master rebase and pep8 fix for netem branch

Please review, if this will work for you. It would be better to use one standard codestyle across branches.

Thanks.