some fixes, starting to think about how to implement placement of nodes
fix bug when deleting links