Fixed many bugs to get it running. Still does not run properly with less than 3 peers per node.