Changed to more efficient representation of metadata.