remove unused imports and trailing spaces.