Refactor response message factory to break down complexity