Improving the progress display code.