Optimized looking at progress indicators and fixed a looping error.  Also added a configurable timeout parameter.
Forgot to add controller.js
Fixed typo