Factor out results processing