Main loop

Main loop for controlling number of runs and delay between them
implemented.