Cleanup in main