Move common harvesting logic from the node plugin into harvesting package.