Added insert_Perm and be_*_main_env_t