Fixed bug in friends-of-friends method and refactored tests.
Grouped tests into 2 groups: unit and integration.