New formating of code.

Code is now PEP8 compatible, most of code is commented including
parameters and some other minor changes done. This is no functional
commit.