Refactored range splitting code into split.go.