LinkedList refactoring and addition of new class MaxHeap