stop storing toplevel_env everywhere

makes constructing environments cheaper