Add build & release primitives
Scope flag vars to avoid leakage
Defer closing of chans