Use defined function to remove duplicates
Remove old comment

Now it is wrong.
Merge pull request #2256 from tricknotes/remove-duplicates

Remove duplicates