Small refactor and bug fix for plot irrigation.