Move try...catch statements outside of loops

Also copied the foxlinks_quotes functions from allPages.js into
the messageList object, and made various other small changes.