Added an option to use domain_table and only scan for hosts in 'domain' also some minor bug fixes