Fix syntax error in email.php, other minor fixes