Refactor Endpoints support.