Email class and tests