ENH: Cast a defaultdict to dict

@wasade and @Jorge-C brought the point that having a defaultdict
instance could be prone to error on the long run, therefore the
suggestion was to use that class to construct the dictionary and make
the code cleaner but explicitly cast as a dictionary after its
construction.