Correcting some old vestigal code to make it run