Refactor experiment utility