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 
If you're going to add a parameter to the hook, you should also update the hook docs.