Improve the garbage collection so that it doesn't remove objects before the developer had a chance to get a handle to them. Fix issues with threading in the idle handler, and also a bug the render_sequence code