Refactor message process() algorithm so that it's more flexible