Improved method generation.