more progress, need to handle close and env_get_cursor_for_persistent_environment