Make progress.bar configurable.
Add test for cb parameter.
Refactor some tests.