Removed reverseHeader stuff and fixed some matching bugs