Remove unneeded variables or move their definition close to their only use.
Moved prognam to be member of Stargen class.
Moved flag_seed as member of Stargen class and several other functions that used it.