Fix search for changed part; some minor fixes

create and compare proper trees of docs, finally
recursion is not a problem, despite Python restriction, because if some
doc will have more than 999 nesting depth — the first problem would be
readability, the second would be probable troubles with converter, and
only the third is recursion limit in Python