most of edit JS implemented

still need to write function to store the edits. This will probably be in next commit.