Implemented a simple queue via doubly linked list.