Working setup

Fixed misunderstandings of search in dom objects.
Improved percentage calculation.
Fixed tests.