add_reply() modification for editing

and minor improvements