(PE-2427) rename 'app' namespace to 'internal'
a little cleanup and re-org