small fixes and code formating according to PEP8