Updated to new metadata interface