Added error capabilities

Brought in code to make it possible to call error messages.