Added construction of phi congruence classes.