Improve messages class