Move metadata to helper fn.