Minor refactor for api/endpoint classes