WIP passing tests. TODO: access to cached_env