clean up source code about header matching and meta matching