Changed generated metadata from object to class for flexibility