Move cleanup into teardown, delete obsolete code.

cc @senny
@zuhao could you explain why this code has become obsolete?