Changed return type of factorymethods in messages to the implemented interface.