Structured deterministic models applied to malaria and other endemic diseases