Fixed clear table and added error handling

Graph will now clear the table after each query so it doesn't get
spammed with old entries.

Also ajax will now return a message if it gets s 5XX error from the
Server. Nothing helpful, just an 'oops' message.