Added functionality to linked list class