Add checks for existing nodes/classes in node setup code