uses hexrd.utils.progressbar, and whitespace cleanup