Modify MyLinkedList to use generic types and include an iterator