Clean Generator code