Pythonic cleaning

This is a controversial code formatting PR. It covers only part of pythonic.