Linked list using generics