NEWTS-13: mv result processing code to its own module