Add Auto-stop

Automaticaly stop execution if the same instruction is executed twice in a row. The new boolean variable is required to change the behaviour of the isRunning() function so that it returns true one more time after transitioning from true to false. This is a workaround around the fact that the view is only updated if isRunning returns true.