Adding the factory with message and messages.