Most of the following is based on the various writings of Rabbi Chaim Vital, of blessed memory.

Know that from the aspect of Atzilut, the Torah is explained in a fashion relative to the sefirot that emanate from it. All concepts of the Torah and its' commentaries are not from the level of Neshama, except for secrets of the Zohar.

When the Redemption comes…every one remaining shall be completely pure and good….

In the future (hopefully soon) when the Redemption comes, all the kelipot will be voided and the Jewish nation shall have been sorted out, the good extracted from the waste. Every one remaining shall be completely pure and good without any bad. Those that had diligently applied themselves with acts of loving-kindness (performed with the intentions from the realm of secret, most inner, aspect of the Torah, as well as meticulously performing their prayers and other mitzvot) following the manners stemming from the level of secret aspect of the Torah, with purity and cleanliness, they, without doubt, when the secret of the "Tree of life" (the aspect of the soul of Atzilut) bursts through, will not need the "tests" of the End of Days.

The purpose of the tests is for those that connect themselves to the simple, surface aspect of the Torah….

This is because the purpose of the tests is for those that connect themselves to the simple, surface aspect of the Torah, which stems from the Tree of Knowledge of Good and Evil. This connection indicates that their souls emanate from the realms of Beriya, Yetzira, and Asiya. Where, in those worlds applies the verse "In cycles shall travel the evil doers". (Psalms 12:9) They need to be tested for them to ultimately determine for themselves as to where they want to remain connected, to the good or the evil.

Yet those who stem from the Tree of Life, upon them it is written, "And the intellectuals shall shine as the shining of the sky", (Daniel 12:3) which indicates that their souls emanate from the realm of Atzilut. Therefore, the tests of the final redemption will not be as heavy for them, as for the people with inequities.

After the final redemption there will be a great revelation of the secrets of Torah that have been thus far hidden….

After the final redemption there will be a great revelation of the secrets of Torah that have been thus far hidden from all. This revelation will even be for those that didn't make efforts to understand Torah on its deeper, mystical level (called "sod"). They will be privy to that revelation since they toiled to understand the simple levels of Torah. At that point in time, both groups will study the Torah and Mishna and Halacha on the mystical level.

That doesn't mean that, G‑d forbid, the Torah and Jewish Law as we understand them now will change. Rather, the intention behind them as well as the environment in which we will fulfill them will change, as in the desert with the Manna. That form of sustenance had the ability to assume the flavor and characteristics of any food. Therefore, the laws of Meat and Milk weren't applicable to the Generation of the [Sinai] Desert. This was also true regarding the laws of prohibited fats and blood, the laws of slaughtering and inspection etc. In this fashion the rest of the laws of what is forbidden or permissible were lessened, out of practicality. The same went for some of the laws of impurity and purity etc.

In that fashion, in the Future, the Jews will derive sustenance from the Manna, which is also rooted in the Tree of Life. Yet the ignoramuses will not share that type of existence, rather they will dine on bread and flesh, which is derived from the Tree of Knowledge of Good and Evil. And for them, all the laws will be pertinent.

This will leave the people one choice, to trust in G‑d alone….

Now I shall explain more. Know that the future redemption will be with the help of G‑ds' relationship of "the left side pushing away". In other words, the salvation shall be pushed off or extended for six months, from Tishrei (which is the aspect of Judgment, implying the left side) until the month of Nissan (which represents "the right-side drawing in", hence the first exodus started in this month). For during these six months there will be poverty, trials, tribulations and purification, as will be explained. The purpose of this period is to prepare everyone to merit the redemption; this will be accomplished through the trials and tribulations. As is stated, "And I shall leave amongst you of the nation, poverty and destitution, and you will yearn for, and trust in G‑d". (Zephaniah 3:12)

The benefit derived from this approach is that if they would be redeemed through the secrets of strict gevura, then, G‑d forbid, there would be a vast reduction in the population of Jews. For, from the side of strict judgment, there will be decimation via the enemies of the Jews and those remaining will be held in high esteem. Yet this is not G‑d's intention. Rather His intention is that they all repent and merit the Redemption. For if there is a reduction, G‑d forbid, that would result in a reduction of G‑d's honor, as well as in a diminishment of the supernal sources. For "with the majority and masses of the nation is the splendor of the King". (Proverbs 14:28) For the Sages tell us that theShechina will not dwell upon a group of less than 600,000. Therefore the world shall remain full till the time of the Redemption, without a reduction of that minimum measure of people. All those shall merit the Redemption, and will increase they glory and honor of G‑d as well as making abundant the supernal sources.

Know that the redemption has two "times". Firstly, "in its' set preordained time" [literally, "its' time"], (Isaiah 60:22) "a time for laughter"; (Ecclesiastes 3:4) that scenario will only be merited by those completely righteous, i.e. "Only one from a city or two from a family". (Jeremiah 3:14) Yet there is another time when "a pauper will be oppressed by his poverty" (Job 36:15) and will repent and merit redemption. That will be for the multitudes.

This will come about through excruciating travails, the likes of which have yet to be seen. The people will feel that all they are is just their bare essential body, nothing more. That self-assessment can only be arrived at through ultimate destitution. This will be accompanied by immense suffering and abundant wailing, thus softening the hardened hearts. This will leave the people one choice, to trust in G‑d alone.

This could only come about through a most intensive destitution. For even if someone suffers pain, yet they are comforted being that they have food. Or if they have no food, yet they have drink. Or if they have no drink, yet they have some financial resources to put to some use etc. Those situations are likened to "I shall be a source of comfort at your times of travail". (Psalms 9:10) Therefore the suffering at the end of time must be all encompassing, availing no consolation. Wailing in poverty - no bread, no clothing, no comfort, no dwelling place, no house, no city, "no garment in the cold". All that one will remain with is his body, nothing else - in the aspect captivity, death, and slaughter - and G‑d exchanges for them death in poverty [for life].

Those that can't endure will try to return to the nations and assimilate...

This is what is meant by the forty-five days that the Jews will be exiled from Jerusalem to the Judean desert. Then they will seek refuge in caves and search for water and shrubs to survive. This will be similar to Lot and his daughters escaping Sodom to the nearby mountainous caves, for they hadn't even taken with themselves a small morsel of bread. Those remaining will be spread out throughout the desert. All the sufferings the Jews had endured throughout the centuries won't compare to this experience.

That will last until Moses [i.e. the Mashiach] reveals himself to them. He will cry with them, as he came to cry with them by the banks of the rivers of Babylon, during the beginning of the First Exile. They will then count 45 days in concurrence with the aspect of Moses - being "Mah" [= 45]. All that they will eat there is bitter roots of the shrubs, for which they'll have to scavenge. In that situation, they will completely repent.

Those that can't endure will try to return to the nations and assimilate. They will be cutting themselves off. The rest will have to bear with the situation, each in accordance to that which is necessary to affect the cleansing of the effects of his transgressions.

The righteous ones will eat these bitter salty roots and will be blessed through them, as if consuming Manna. This will fortify their strength and trust in G‑d. The mediocre ones will repent. And the evil ones will either be cast off or suffer a difficult penance.

Yet the only function Moses will have is to cry with us. Through this time of crying, penance and self-introspection, we'll be guided through the process of returning to G‑d [i.e. repentance].

After that stage, the deceased shall rise from the desert. And redemption and freedom shall sprout forth. Then we will proceed to Jerusalem, having been redeemed. And will witness the rebuilt city, with the rebuilt Temple, and the Shechina returning to dwell there within. Then they receive flags as they did upon the exodus from Egypt. Then G‑d will grasp the corners of the world and shake off all the evildoers. All this will occur whilst the Jews will only be existing with just their bodies, no other possessions.

After that they will be granted immense wealth. This will be as a result of the many treasures of the sea being spewn out of the ocean at Jaffa. They will also benefit from the spoils of the war of Gog and Magog. Yet none of this will give us any pleasure in comparison to the rebuilt Holy Temple. As is written, "This is the day G‑d has made, let us rejoice and revel in Him." (Psalms 118:24)