Fixed the Deque and LinkedList implementations. They were not properly dealing with linking and null values.