Changed pepa to support multiple resources/endpoints