diff --git a/enzevalos_iphoneTests/CoreMailTest.swift b/enzevalos_iphoneTests/CoreMailTest.swift
index 64954e7a3556bc2abfffaa6f628d007b2a356f7b..57eb5edcb7ba0d1d4f3895557aac0941d78f635f 100644
--- a/enzevalos_iphoneTests/CoreMailTest.swift
+++ b/enzevalos_iphoneTests/CoreMailTest.swift
@@ -51,7 +51,7 @@ class CoreMailTest: XCTestCase {
     func testImportMail(){
         let addr = "vic@example.com"
         let addr1 = AddressProperties(email: addr)
-        let folder = FolderProperties(delimiter: nil, uidValidity: nil, lastUpdate: nil, maxUID: nil, minUID: nil, path: "Testfolder", parent: nil, children: nil)
+        let folder = FolderProperties(delimiter: nil, uidValidity: nil, lastUpdate: nil, maxUID: nil, minUID: nil, path: "Testfolder", parent: nil, children: nil, flags: 0)
         
         let importExpectation = expectation(description: "Import new msg!")
 
@@ -89,7 +89,7 @@ class CoreMailTest: XCTestCase {
     
     func testDuplicateMails() {
         let addr1 = AddressProperties(email: "vic@example.com")
-        let folder = FolderProperties(delimiter: nil, uidValidity: nil, lastUpdate: nil, maxUID: nil, minUID: nil, path: "Testfolder", parent: nil, children: nil)
+        let folder = FolderProperties(delimiter: nil, uidValidity: nil, lastUpdate: nil, maxUID: nil, minUID: nil, path: "Testfolder", parent: nil, children: nil, flags: 0)
 
         let m1 = MailProperties(messageID: "1", uid: UInt64(arc4random()), subject: "MSG1", date: Date(), flags: 0, from: addr1, folder: folder, signatureState: 0, encryptionState: 0)
         let m2 = MailProperties(messageID: "1", uid: UInt64(arc4random()), subject: "Second MSG1", date: Date(), flags: 0, from: addr1, folder: folder, signatureState: 0, encryptionState: 0)
@@ -121,7 +121,7 @@ class CoreMailTest: XCTestCase {
     
     func testDuplicateMails2() {
         let addr1 = AddressProperties(email: "vic@example.com")
-        let folder = FolderProperties(delimiter: nil, uidValidity: nil, lastUpdate: nil, maxUID: nil, minUID: nil, path: "Testfolder", parent: nil, children: nil)
+        let folder = FolderProperties(delimiter: nil, uidValidity: nil, lastUpdate: nil, maxUID: nil, minUID: nil, path: "Testfolder", parent: nil, children: nil, flags: 0)
 
         let m1 = MailProperties(messageID: "1", uid: UInt64(arc4random()), subject: "MSG1", date: Date(), flags: 0, from: addr1, folder: folder, signatureState: 0, encryptionState: 0)
         let m2 = MailProperties(messageID: "1", uid: UInt64(arc4random()), subject: "Second MSG1", date: Date(), flags: 0, from: addr1, folder: folder, signatureState: 0, encryptionState: 0)
@@ -171,7 +171,7 @@ class CoreMailTest: XCTestCase {
         let addr1 = AddressProperties(email: "vic@example.com")
         let addr2 = AddressProperties(email: "alex@example.com")
         let addrs = [addr1, addr2]
-        let folder = FolderProperties(delimiter: nil, uidValidity: nil, lastUpdate: nil, maxUID: nil, minUID: nil, path: "Testfolder", parent: nil, children: nil)
+        let folder = FolderProperties(delimiter: nil, uidValidity: nil, lastUpdate: nil, maxUID: nil, minUID: nil, path: "Testfolder", parent: nil, children: nil, flags: 0)
 
         
         var msgs = [MailProperties]()
@@ -218,7 +218,7 @@ class CoreMailTest: XCTestCase {
         let addr1 = AddressProperties(email: "vic@example.com")
         let addr2 = AddressProperties(email: "alex@example.com")
         let addrs = [addr1, addr2]
-        let folder = FolderProperties(delimiter: nil, uidValidity: nil, lastUpdate: nil, maxUID: nil, minUID: nil, path: "Testfolder", parent: nil, children: nil)
+        let folder = FolderProperties(delimiter: nil, uidValidity: nil, lastUpdate: nil, maxUID: nil, minUID: nil, path: "Testfolder", parent: nil, children: nil, flags: 0)
         var expectations = [XCTestExpectation]()
         
         var res = 0
diff --git a/enzevalos_iphoneTests/CryptoTests.swift b/enzevalos_iphoneTests/CryptoTests.swift
index a1fe06a0d333638f2492ca28f156343abf583ef3..4b8d357544ae09657fd2ed37a99aee5773548973 100644
--- a/enzevalos_iphoneTests/CryptoTests.swift
+++ b/enzevalos_iphoneTests/CryptoTests.swift
@@ -533,7 +533,7 @@ class CryptoTests: XCTestCase {
     func testEncSignedMail() {
         let body = "signed text"
         let (senderAddress, senderID) = createPGPUser()
-        let (userAddr, id2) = createPGPUser()
+        let (_, id2) = createPGPUser()
 
         let senderPGP = SwiftPGP()
         let encObject = senderPGP.encrypt(plaintext: body, ids: [userKeyID], myId: senderID)
@@ -609,7 +609,7 @@ class CryptoTests: XCTestCase {
     func testMail(from: AddressProperties, to: [AddressProperties], body: String, encState: EncryptionState, sigState: SignatureState) -> MailProperties {
 
         let subject = "Test mail"
-        let folder = FolderProperties(delimiter: nil, uidValidity: nil, lastUpdate: nil, maxUID: nil, minUID: nil, path: "Testfolder", parent: nil, children: nil)
+        let folder = FolderProperties(delimiter: nil, uidValidity: nil, lastUpdate: nil, maxUID: nil, minUID: nil, path: "Testfolder", parent: nil, children: nil, flags: 0)
         
         let mail = MailProperties(messageID: "dasdads", uid: UInt64(arc4random()), subject: subject, date: Date(), flags: 0, from: from, to: to, cc: [], bcc: [], folder: folder, body: body, attachments: [], signatureState: sigState.rawValue, encryptionState: encState.rawValue, signatureKey: nil, decryptionKey: nil, autocryptHeaderKey: [], attachedPublicKeys: [], attachedSecretKeys: [])
         
diff --git a/enzevalos_iphoneTests/GeneratedMocks.swift b/enzevalos_iphoneTests/GeneratedMocks.swift
index 581522790fbe923af96a51b0daee6a923b700485..7c8e9c91e1d1e7a3a136c78a1b58b39eaa07d191 100644
--- a/enzevalos_iphoneTests/GeneratedMocks.swift
+++ b/enzevalos_iphoneTests/GeneratedMocks.swift
@@ -1,4 +1,4 @@
-// MARK: - Mocks generated from file: enzevalos_iphone/AuthenticationModel.swift at 2021-04-08 09:17:40 +0000
+// MARK: - Mocks generated from file: enzevalos_iphone/AuthenticationModel.swift at 2021-04-10 11:01:02 +0000
 
 //
 //  AuthenticationModel.swift
@@ -654,7 +654,7 @@ import Foundation
 }
 
 
-// MARK: - Mocks generated from file: enzevalos_iphone/AuthenticationViewModel.swift at 2021-04-08 09:17:40 +0000
+// MARK: - Mocks generated from file: enzevalos_iphone/AuthenticationViewModel.swift at 2021-04-10 11:01:02 +0000
 
 //
 //  AuthenticationViewModel.swift
diff --git a/enzevalos_iphoneTests/MailTest.swift b/enzevalos_iphoneTests/MailTest.swift
index 30ad8070884176cc7a3942832c05a31014be76de..8172340ff7612b115f65eb5508321e325656c455 100644
--- a/enzevalos_iphoneTests/MailTest.swift
+++ b/enzevalos_iphoneTests/MailTest.swift
@@ -115,7 +115,6 @@ n1O3czuVl7rPXrJn0A/MVI2ReKOQeIAYMg==
     }
 
     private func storeAndTestMail(mails: [IncomingMail], testFunc: (_ mail: MailRecord) -> ()) {
-        let oldmails = dataprovider.fetchedMailResultsController.fetchedObjects?.count ?? 0
         let importExpectation = expectation(description: "Import new email!")
         dataprovider.importNewData(from: mails.map({$0.export()}), completionHandler: { error in
             if let error = error {
diff --git a/enzevalos_iphoneTests/SMIMETests.swift b/enzevalos_iphoneTests/SMIMETests.swift
index 033b57fadea80cca4a3b91dfdd70595ecafac1ff..dffc57907894444f4b3a06f3093515529fa817b7 100644
--- a/enzevalos_iphoneTests/SMIMETests.swift
+++ b/enzevalos_iphoneTests/SMIMETests.swift
@@ -433,8 +433,7 @@ PkfA6mR7rtcyIbHi34tfkCv/qolV3QivMHov0IJpRyNO
             XCTFail("Could not sign!")
         }
         
-        //if let signedData = signObj?.chiphertext {
-        if let signedData = signObj?.chiphertext, let signedText = signObj?.chiperString {
+        if let _ = signObj?.chiphertext, let signedText = signObj?.chiperString {
             let text = signedText
             let verifiedObj = smimeObj.verify(data: nil, string: text, email: ourAddr!, isMailNew: true)
 
diff --git a/enzevalos_iphoneTests/phishing/MailComparisonTests.swift b/enzevalos_iphoneTests/phishing/MailComparisonTests.swift
index 0dcb8f8dfa29d0afa76d15883ea8fcda312722d7..2d54cdaa7c0475cbf1202d6c05d782b4a844d604 100644
--- a/enzevalos_iphoneTests/phishing/MailComparisonTests.swift
+++ b/enzevalos_iphoneTests/phishing/MailComparisonTests.swift
@@ -51,7 +51,7 @@ class MailComparisonTests: XCTestCase {
         super.tearDown()
     }
     
-    func testMail(from: AddressProperties, to: [AddressProperties], cc: [AddressProperties], bcc: [AddressProperties], flags: MCOMessageFlag = MCOMessageFlag.init(rawValue: 0), folder: FolderProperties = FolderProperties(delimiter: nil, uidValidity: nil, lastUpdate: nil, maxUID: nil, minUID: nil, path: "Inbox", parent: nil, children: nil), date: Date = Date(timeIntervalSince1970: TimeInterval(arc4random())), cryptoObject: CryptoObject? = nil, body: String = String.random(length: 20)) -> MailProperties {
+    func testMail(from: AddressProperties, to: [AddressProperties], cc: [AddressProperties], bcc: [AddressProperties], flags: MCOMessageFlag = MCOMessageFlag.init(rawValue: 0), folder: FolderProperties = FolderProperties(delimiter: nil, uidValidity: nil, lastUpdate: nil, maxUID: nil, minUID: nil, path: "Inbox", parent: nil, children: nil, flags: 0), date: Date = Date(timeIntervalSince1970: TimeInterval(arc4random())), cryptoObject: CryptoObject? = nil, body: String = String.random(length: 20)) -> MailProperties {
 
         let subject = String.random(length: 20)
         let id = UInt64(arc4random())