Issue #1104: remove duplicated definition

remove duplicated definition.

addReply
addReplySds

and to move acceptHandler forward to sort.