made Consensus a singleton, reformatted code to appear OK on github, added ConsensusExample.