Removing unused imports and dead code