Updated code to match the new Paxos interface
merged previous refactor branch