Part 2.
Adding progress bar and flattening results.