Reorganized the code so that it works at a "domain level" instead of a "csp level". This is required in order to prevent problems with ISPs having the same name