The stability and functioning of multitrophic communities