- Added callback and data parameters to confirm
- Forced JSON as response format for form submissions so error handling
  responds correctly
- Return HTTP status 200 on error so jQuery $.ajax etc. will decode JSON
- Added handling for handling standard exceptions