Refactor split/spill.