Set exitFuture earlier

This way if runFuture's return gets us to the point in the main loop
that checks exitFuture, it'll already be set

A few other minor tweaks too