cleanup main