Modified "delete" of linked list.

Signed-off-by: Lokesh Gyanchandani <lokesh.sgc@gmail.com>