move public classes to public trait/private class pairs