Move curl wrapper to separate file.