Remove unused imports, fix warnings