added targeturi, updated a few error msgs, and updated var name