Moved Progress bar code to file