code cleanup, added logic for adding, finding friends