Factorise numerators and denominators (#310)