Moving test code from window code to scene code