Some PEP8 fixes and absolute import fixes

Fixes as per http://www.python.org/dev/peps/pep-0008/#imports