Instead of letting all the funcions manipulate 1 central dictionary let all the
funcions return a dictionary which is merged in the caller.

This makes things a lot more readable.