Cleanup init and finalize.