Irrigation refactoring