Here is a link to some code explanations: https://www.overleaf.com/project/68594a0d7048aaf77a10abaa
It leads to an Overleaf file containing a description of the implementation of various contact approaches.
The description follows hte code as close as possible.