Fixed linked list, added tests