Change explicit class new calls to more meta programming correct, in case of inheritance