Refactor FriendsController to use best practices