Made number of iterations configurable. Refactored run.sh a bit.