Gracefully fail on nonce mismatch
Removed unnecessary variables and sanitize title better
JSON encode due date
Properly display due date when there is/is not one