This whole function looks an awful like editComment. Maybe they should share a lot of the code?