cleaned scene code