Simplified ProgressWidgetProgress code and made it safer.