Cleaned up unused imports and fixed warnings.