Refactor trust schema API and handle errors in remote trust comms