More flexible metadata. work in progress