Fix lots of warnings. More 64bit-ness