1. Added some W3C specific security measures for when the system runs on W3C; 2. improved the way exceptions are reported (some were prematurely stripped of their messages)