ClassGenerator improved