P2p relationships

Adds relationships to the parser, I want to improve the quality of the code because now there is a stack of 4 `foreach` calls. But the code is ready to be tested.

Reference #79, #112