more code clean up. first step of trying to set up progress bar.