simplified and merged returning of result sets in the optimizations block
simplified and merged returning of result sets in the optimizations block

dperini/nwmatcher,dperini/nwmatcher,dperini/nwmatcher