Restructured code, express' render() is now called on res if mailer is called on res