Removing unused imports and method