corrects the ajax query sent to the server
removes some useless comments