Puzzle: Remove Duplicates from Sorted List. Refactoring