Cleaned up version of cleaned up Gibbs optimizing evolutionary distortion function