Cleanup unused imports and fix formatting.