Moved both get_num_instances_for_*let to a single Extension.get_max_instances

Removes code duplication and uses the correct name to retrieve a property.