Feature/improve find and scan code

Part of fixing #856 and #858. I'm stilling missing the follow config option, but rest should be more or less done, or at least ready for review.
I'm postponing cleaning up where and how this gets filtered given the other changes I have planed wrt. scanning.