Removing redundant code and updates to the friend page