added ajax for commemnt edit
refactoring js