Refactoring of adding friends