Cleanup in main script