Restructure the frontend step/run/break logic

In particular make the button click handlers static. We had a case
where the button had the same click handler set on it twice, which
caused weirdness in some cases.