This is more of a style comment, but I think it'll be better if we maintain one way of accessing variables inside an environment. Right now we seem to use `env[[varname]]` in most of the code, so I think it'll be better to stick to that ?