Fix lots of warnings