Refactored code of module to remove ProgressBar constructor from window context and create for it ProgressBarFactory which will be create new instance of ProgressBar by calling with same params