Fixed a bug with the term tree, added event registration to
ClientRequest.