Eliminated the swap variable correctly.