Fix copy&paste error
Fix swap (use call by reference)
Fix another c&p error
Fix type
Fix interation end