Refactor progress_bar demo