Remove unused imports and format files