Corrected small bugs

The delete image does now appear corectly and the nodes appear at the
correct places in the tree. One remaining bug is that the tree will move
on the first added node. Some variables are not set apparently.