Fix some compile warnings and bad formatting