Revisited #305 and added natural sorting

Well, it seems that the merge of the original code cannot be omitted. On the other hand, it seems that the changes are not included in the change breakdown, so hopefully everything is fine. Otherwise, just let me know, and I will try something else.