Implementing a Linked List and various related operations