     if obj?
         # Searching for fields to encrypt
         try
-            for field in Object.keys(obj)
-                if field.match encryptionPattern
-                    obj[field] = @encrypt obj[field]
+            obj[field] = @encrypt obj[field] for field in Object.keys(obj) \
+                    when field.match pattern
             return obj
         catch error
             # Error are already logged by the encrypt function

    if obj?
        # Searching for fields to decrypt
        try
            for field in Object.keys(obj)
                if field.match encryptionPattern
                    obj[field] = @decrypt obj[field]
            return obj
        catch error
            # Error are already logged by the decrypt function

slaveKey = null
day = 24 * 60 * 60 * 1000

pattern = /^encrypted/

sendEmail = (mailOptions, callback) ->
    transport = nodemailer.createTransport "SMTP", {}
