Rewritten the method of getting a dictionary

This doesn’t create hundreds of unnecessary dicts like the previous
method did