Fix bug in leave detection in cases in which self-loops are defined + doc.
Add static access to build an index easily + doc.
impact changes Induced by the index module.