fixed import, pep 8 compliance improvements