Remove unused imports and trailing whitespace