Minor refactors.

Remove unused imports, format code.