Refactored working garbage collecter code in Kinect simulator