Added PHPMailer & restructured js