Fix duplication in code
Use python-progressbar