Remove the usage of literal_eval

Instead of writing a dicctionary, it was building a string that was evaluated later as python code, that will build a dict. IMHO A bit complex.

But you know better why it was here, so may be I'm wrong with this one.