Added toggle button to the main widget to start and stop the algorithm.