remove references to flow environment