Lets start with problem 2. Think about what you delete. You leave the empty line after "TRANSFER AUTOMATIC". Either use something like
sed "/CREATE NODE $node/,/\n/d" node.txt
Also not sure if this will work. Or after deleting use tr -s '\n' when done. You might also search the net for "sed removing double empty lines".
Regarding your first problem you have to adjust your regex.