added message diaglog, email (doesn't work in squish, and cleanup.