Add methods to chain the headers into a tree
Add better support for [] in regexp header match, cleanup mess