Optimized looking at progress indicators and fixed a looping error.  Also added a configurable timeout parameter.