STY: Reduce list(map usage. Dict keys can be sorted without calling .keys.

Thanks @wasade!