Remove unreferenced variables