Refactoring of result operator handling to support composition and improve perf.