Added tests for gcd and xgcd and fixed aliasing.
Merge branch 'v0.36'