Coordination, Local Interactions and Endogenous Neighborhood Formation