Fixed compilation error and removed unused imports.