Modularized is_entry. Added email sending functionality