Enhanced type annotations for cache variables and improved readability of the toLabels, toValues, and getCustomDefinitions methods.