Added better error hanlding
Added support for the email field type