Coded up Kelner 2006 and setting up M31 for calculation