Fix imports and PEP 8