Major refactor, now single threaded

Turning it into a local function for processFuncs