added some message classes and better message handling