Fixing a whole bunch of warnings