basically decoupled scanning/copying from textmatching in lines
reporting and copying split out from scanning
Finally: basic separation of all scanning from reporting and actioning (without persisting anything)
separated report from copy. Not yet encapsulated, but separated
got rid of the large double search loops. Now elsif.