Removed some unused imports and fixed warnings