make type a string
Change dev.Messages to generic container for tests.
Add generic error handler.
Add test to simulate an error.
update text