Implemented Better Garbage Collection