Restructured the source code for readability and to comply with PEP8 rules.
Merge remote-tracking branch 'upstream/master'
Merge pull request #11 from pavelki/master

Changes improving structure of the source code and making code compliant with PEP8