Remove unused imports and other warning fixes