Garbage collection done

TODO: continuations, tests