Fixed remove duplicates method
removed unused imports