several improvements to the generation of mathods and classes