Added friendships, state and AJAX.