Changed linked list implementation to TAILQ_* from sys/queue.h