I recently had a drain clog and subsequent water leak in the passenger side of my '99 Box. I removed the seat and extracted the water from the carpet, but it was too late for the foam - lots of mildew.

Does the foam serve any legitimate purpose, or can I remove it to prevent the spread of mold?
Thanks a lot.