Help cleaning up this data transformation code

Eh. Map.to_list/1 after Enum.into/3 would do exactly the same.