Refactored and improved messaging