Refactoring. Remove duplicates.