Did some refactoring to sending of paxos messages