Refactoring. Deleted unused objects
Persistence layer updated, MailRules ported to database