Refactor process function to enforce single responsibility.