Added anti-spam. Cleaning msgs on shutdown.