Multidict WIP

Continued work on multidict, updated multidict tests.
Some tests sometimes fall, possibly due to elements order. Work in progress
This code repeats three times already - may be worth to be more DRY?