cleaned up commented code.
better output for ajax response.
stable state for query, about to begin new method for save.

?method no longer required as it is now determined by the $method. POST = save, GET = query.