In order to make sent_subfolders work I had to change a lot of code.