Genocide of Global variables to speed up operation. Hopefully everything still works
--Fixing compiler warnings