Encapsulate Local Functionality

Any function used local must be defined as local.


Last modified November 10, 2025: Merge pull request #279 from microsoft/jeremy-siteops (d2cdf97) by Jeremy Vyska