cleanup and debugging output
Applying Oren's Attachment Patches
Finish fix-attachements