baseClassBuilder refactor based on embedded classes