Tentatively finished insert function for LinkedList class.