Add flagging API.

@bendrucker what do you think about the API for adding instance vars?