use is_domain_aware() to get rid of cruft
remove unused constants