Fixed SinglyLinkedList and DoublyLinkedList DataStructure pointer reference issues