Add progress bar

Fixes #5.
Various improvements