improve script
remove unused prototype
treat @instances clear as scene pop