better passing around of parent refs, and access to client from endpoints