Rewrite dictionary creation as a dictionary literal

Do that if it makes sense

Change-Id: I4c53ca90c082faa62d8584f75d5bb0a31bb5131f
Merge "Rewrite dictionary creation as a dictionary literal"