Bug fixing and progress bar work.

More bug squashing and adding more to be squashed.