Some refactoring and add methods to get Aggregate mailing metrics and

list of mailling templates.