move abortable functions into token tree module