Completed the linked list functionality