Imports and pep8 fixes