implemented mark-sweep gc
removed bad gc code