Cleaned up progress bar code