Move and rename process_url function