Cleanup main.