Final touches to generation code