Finished relations.py which determines direct and similar links between users