Removed unused strcpy
Fix hostname checking
Added sample excludeDomains
Handle data errors better, check global allow once per query