Remove unreferenced local variables