Add flow support

Auditors: emily
Fix global variable and missing state parameter

Summary:
Thanks, flow!

Test Plan:
voodoo2

I mean...

    flow check

Auditors: emily