Adding calls to cyclic crossover, also a is_valid function