I'm having trouble with this function. It looks like the only reason it's separate from commit() is because it's leader stuff, but in that case shouldn't it just be a conditional block there, or a helper function that commit() calls, instead of being called separately by the message handlers under conditionals?