Remove unused imports and old code