Implemented a basic GC. There are still some serious bug in the root detection.