Correct and refactor code, complete literate documentation of perform_experiments.c.