Make the construction of a 2D dict cleaner

Thanks for the pointer @wasade!