LinkedList implementation. Not extensively tested.