Remove unused code
Refactor the "buffer_with_matches" method