Improved `merge_dict` and included few docstrings

Python dictionaries have `update` method. That would be far more efficient than converting the `dict.items` to list and creating a `dict` at the end.