Move helper classes into anonymous namespaces.