Added a friendship UI and state machine to manage the friendships.