performance improvements. Progress bar working but is not currently useful.