Updated message factory