Modified link structure, now it stores node pointer rather than its id.