Changed address to node.target.offset format. Also included sorting logic.