Mostly just an update to ajax.php to allow non-select queries.