fix doubly linked list errors by using correct refrences before update. fix arraylist. all tests passing ;).