Separate top-level state (env) from transient state (opts)