Improve imports and follow PEP8