misc
Move logic from hook_node_{insert|update} to plugin class.