Add order replies.
Replace end functions with constants.