Adding comments and setting head/tail to NULL when list is emptied.