Better error handling, and the linkout_url method doesn't belong in this extension