Added error codes and reply codes.