Added GC and fixed bugs.