Refactor split/spill.
Merge pull request #148 from benbjohnson/split-spill

Refactor split/spill