Add support for (XML) structured search
unit test refactoring and improvements