Added swapint() and gcd()