Addes support to changing link between nodes, added 3 test for this, fixed several bugs