Add ability to use multi-level hash in raw notification

Some refactoring was made during this.

In theory it is possible to extract 5f289ce and  4c7e68b into a separate branch without refactoring, but that's the way I had my thoughts flow. :bow:

Please take a look and merge if you think it is good enough. There are some tests included, so hopefully nothing is broken.