Complete rewrite making use of processing functions (process*)