Added test cases for doubly linked list and improved its codes