integrated changes from codaFi into my branch so we can merge this into the main mailcore branch