redo beforeMatching and beforeEachMatch, add tests
add some documentation to Service class