Move around imports, pep8 fixes (lines too long)