Fix a bunch of compiler warnings