Fixed some bugs with for loops. Now the peers react to disconnect events and reconnect to the nearest ones. Routing maintainance added and exchange of messages when peers go down or join.