Move _process_data to process_elements (public API)