Updated linkedlist to wirk with void pointers