Adding Phi and GCD bits, fleshing out maths