CMS-4436 Move some "internal" classes to API.