Refactored LinkedList and tests.