Initial version of the metadata function.