remove unused imports and fix warnings