Fix compiler warnings and style.