Implement module pattern to organize message actions