Changed classes EmailSettings and EmailTemplate to the newer