Make the process_list implementation cleaner.