remove endpoint class and move thread safety stuff into ar monkeypatch