added mailer; changed database scheme