Implemented most of replyHandler.