Move split function to global scope.