fixed GC refcount bug & closure cleanup bug
+ refactor