GenerationParams struct created. Code refactored. Popular data pattern added.