Changed packages for ReversedLinkedList and fixed logic