Refactor remote in place name and description edit javascript.