Tidy imports.
Run autopep8 and carry out general tidying of the codebase.