Population and community response to habitat change