Added structured error messages
Updated documentation