Move methods to prototype to allow interception
Fix issue with  access when notifying document and index update and deletion