Update for new usage of NUM_DVC_INST. Added function comments.