Adjusted code to adhere to PEP8
Added several missing unittests.
Fix test
Merge pull request #2 from Neob91/BUG_944

Bug 944