Moved some js to Consensus.js