Move node cleanup to backend