Changed linked list from integers to generics