nit: s/endPoint/endpoint/g in the whole patch