improve progress bar code

Just do all of the dom work before adding it to the stage.