Made modules PEP8 conformant (PEP8ized branch merge)

* Made modules PEP8 conformant, fixed missing self (detected by tools), used
shortcut variable to use in place of long expressions (limit long lines).

* Adding .gitattributes for unified line-ending

* Convert EOL from dos to unix
  perl -pi -e 's/\r/\n/g'