Extract common behavior from endpoints classes