messages classes + miscellaneous fixes around