progress bar plus some performance changes