Added AJAX functionality for edit buttons