Fix many compile time warnings.