fixed some problems with the ajax script and added updating for the edited row