Tweaking generation code