Make local funcs/state static to avoid name collision and abstraction leakage.