Communities, Environment and Regulation in the Premodern World