Added in progress bar and mechanism for painting progress bar whilst there are long running tasks that lock up the GUI.