Cleaner Curl code