Refactors progress bar output