added memory management to Scenes