click to edit, JS cleanup