Cleaned the code

Now the progressbar can be implemented using single line of code.