Restructure client to use only public API endpoints, removing old code.