onBeforeSave and onBeforeRemove hook for Nodes