Add sort to retrieve history

While forcing the sort I'm sure that I will retrieve latest items
Remove dead code + increase coverage