Aesthetic changes and bug fixes for progress bar
Plug memory leak
Fix compiler warnings