ticket:13 reformat most part of code according to PEP8, remove unused imports