Tidied up curl client and started on MetadataManager to handle retrieving and cachiong metadata