Adapt list usage to libft