An empty message should not be even sent

Plus some cleaning.