Code refactoring of experiments