PEP8 style fixes and changed imports