Some functions to calculate fitness and p values, some todos