Added tests for gcd and xgcd and fixed aliasing.